/*
 * Copyright 2020-2025 the original author or authors.
 * You cannot use this file unless authorized by the author.
 */
package org.ipig.messaging.kafka.producer;

import org.apache.kafka.clients.producer.KafkaProducer;
import org.ipig.commons.conf.kafka.producer.KafkaProducerConf;
import org.ipig.constants.ResultStatus;
import org.ipig.messaging.ProducerService;

/**
 * 请在此处添加注释
 *
 * @author <a href="mailto:comchnts@163.com">chinats</a>
 * @version $$Id: KafkaProducerService.java 3 2020-01-21 09:36:33Z ts <comchnts@163.com> $$
 * @since 1.0
 */
public interface KafkaProducerService extends ProducerService<KafkaProducer<String, String>, String, ResultStatus> {
    /**
     * getConf
     *
     * @return 配置
     */
    public KafkaProducerConf getConf();

    /**
     * send
     *
     * @param message
     * @return
     */
    default public ResultStatus send(String message) {
        return send(message, null);
    }

    /**
     * send
     *
     * @param message
     * @param key
     * @return
     */
    public ResultStatus send(String message, String key);
}
